package com.greyu.ysj.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 
 */
public class CbtDraw implements Serializable {
    private Integer id;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 提现地址
     */
    private String account;

    /**
     * 提现数量
     */
    private Double amount;

    /**
     * 提现时间
     */
    private Date drawDate;

    /**
     * 手续费
     */
    private Double fee;

    /**
     * 以太坊价格
     */
    private Double ethPrice;

    /**
     * 交易hash
     */
    private String drawHash;

    /**
     * 提现状态: 0 代表提现失败;1 代表提现成功;2 代表提现中...
     */
    private Integer status;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Date getDrawDate() {
        return drawDate;
    }

    public void setDrawDate(Date drawDate) {
        this.drawDate = drawDate;
    }

    public Double getFee() {
        return fee;
    }

    public void setFee(Double fee) {
        this.fee = fee;
    }

    public Double getEthPrice() {
        return ethPrice;
    }

    public void setEthPrice(Double ethPrice) {
        this.ethPrice = ethPrice;
    }

    public String getDrawHash() {
        return drawHash;
    }

    public void setDrawHash(String drawHash) {
        this.drawHash = drawHash;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CbtDraw other = (CbtDraw) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getAccount() == null ? other.getAccount() == null : this.getAccount().equals(other.getAccount()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getDrawDate() == null ? other.getDrawDate() == null : this.getDrawDate().equals(other.getDrawDate()))
            && (this.getFee() == null ? other.getFee() == null : this.getFee().equals(other.getFee()))
            && (this.getEthPrice() == null ? other.getEthPrice() == null : this.getEthPrice().equals(other.getEthPrice()))
            && (this.getDrawHash() == null ? other.getDrawHash() == null : this.getDrawHash().equals(other.getDrawHash()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getAccount() == null) ? 0 : getAccount().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getDrawDate() == null) ? 0 : getDrawDate().hashCode());
        result = prime * result + ((getFee() == null) ? 0 : getFee().hashCode());
        result = prime * result + ((getEthPrice() == null) ? 0 : getEthPrice().hashCode());
        result = prime * result + ((getDrawHash() == null) ? 0 : getDrawHash().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", account=").append(account);
        sb.append(", amount=").append(amount);
        sb.append(", drawDate=").append(drawDate);
        sb.append(", fee=").append(fee);
        sb.append(", ethPrice=").append(ethPrice);
        sb.append(", drawHash=").append(drawHash);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}